package com.cloud.multiClientSocket;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

public class MyTcpServer {
    public static void main(String[] args) throws IOException {
        //tcp使用5555端口
        ServerSocket serverSocket = new ServerSocket(5555);
        Socket socket = serverSocket.accept();
        System.out.println("tcp建立了连接");
        System.out.println("客户端发送tcp端口为" + socket.getPort());
    }
}
